﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageNavStepTwoCol.master"
    AutoEventWireup="true" CodeBehind="LookingForTeam.aspx.cs" Inherits="WebSite.LookingForTeam" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="js/baby.js" type="text/javascript"></script>
    <style type="text/css">
        #findresult
        {
        }
        
        
        .photoframe img
        {
            width: 200px;
            height: 200px;
        }
        
        #findresult .resultitem
        {
            display: inline-block;
            min-height: 50px;
            height: 280px;
            width: 330px;
            margin-bottom: 20px;
            margin-right: 1px;
            float:left;
        }
        
        
        #findresult .resultitem .textpart
        {
            display: inline-block;
            vertical-align: top;
            padding-top: 5px;
        }
        
        #findresult .resultitem .textpart p
        {
            margin: 8px 0;
        }
        
        #findresult2
        {
            margin-left: 15px;
        }
        
        #findresult2 .resultitem
        {
            display: inline-block;
            min-height: 50px;
            height: 280px;
            width: 210px;
            margin-bottom: 20px;
            margin-right: 0px;
            float:left;
        }
        .resultitem .photoframe
        {
            background: url(images/userphotoframe.png) no-repeat;
            width: 207px;
            height: 207px;
            display: inline-block;
            padding: 3px;
        }
        
        #findresult2 .resultitem .textpart
        {
            text-align: center;
            margin-top: 5px;
            margin-bottom: 5px;
        }
        
        .filterarea
        {
            display: inline-block;
            background: url(images/LookingForTeam/filterarea.png) no-repeat;
            width: 650px;
            height: 30px;
            margin-top: 20px;
        }
        .filterarea ul li
        {
            float: left;
            height: 29px;
        }
        .filterarea ul a
        {
            line-height: 29px;
            height: 29px;
            text-decoration: none;
            padding: 0px 55px;
        }
        
        .filterarea ul li.cur
        {
            background: url(images/LookingForTeam/filter_selected.png) no-repeat;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="background: url(images/LookingForTeam/woyaozudui.png) no-repeat; height: 37px;">
        <div style="float: right; text-indent: 2em; background: url(images/sina_icon.png) no-repeat; vertical-align:top ">
            <script>
                //addweiboinvitebtn();
            </script>
            <a target="_blank" href="http://service.weibo.com/share/share.php?url=http://cover.carrefour.com.cn/BabyList.aspx&appkey=1205039490&title=%E5%AE%B6%E4%B9%90%E7%A6%8F%E2%80%9C%E5%86%A0%E5%86%9B%E5%AE%9D%E8%B4%9D%E5%9C%A8%E6%88%91%E5%AE%B6%E2%80%942013%23%E5%BF%AB%E4%B9%90%E5%AE%9D%E5%AE%9D%E5%B8%AE%23%E5%A4%A7%E8%B5%9B%E2%80%9D%E5%BC%80%E8%B5%9B%EF%BC%81%E4%B8%87%E5%85%83%E5%A4%A7%E5%A5%96%E6%88%91%E6%9D%A5%E4%BA%86%EF%BC%81%E7%8C%9B%E6%88%B3%3E%3E%3Ehttp%3A%2F%2Fcover.carrefour.com.cn&ralateUid=2026014915&language=">
            邀请我的好友一同参赛吧!</a></div>
        <div class="clearfloat">
        </div>
    </div>
    <div style="margin-top: 10px; text-align: center;">
        <img src="images/SeparLine.png" alt="line" />
    </div>
    <div style="margin-top: 20px;">
        <div style="display: inline-block;">
            <img src="images/LookingForTeam/woyiyouduiyou.png" alt="has" />
        </div>
        <div style="display: inline-block; vertical-align: top">
            <input id="searchByName" type="text" class="Textbox" value="<%= Request.QueryString["query"] %>"
                style="vertical-align: top" />
            <input type="image" onclick="goQuery(); return false;" src="/images/LookingForTeam/findother.png" />
        </div>
    </div>
    <div style="margin-top: 20px;">
        <img src="images/LookingForTeam/findresult.png" alt="has" />
    </div>
    <div id="findresult">
        <% if (Request["query"] != null && listSearchByName.Count == 0)
           {  %>
        您所查找的宝宝信息不存在，或已组队
        <%} %>
        <% foreach (var babyInfo in listSearchByName)
           {%>
        <div class="resultitem">
            <div style="height: 210px">
                <div class="photoframe" style="float:left;">
                    <img class="wbshare" src="<%= babyInfo.BabyHeadImg %>" alt="photo" />
                </div>
                <div class="textpart ft_14"  style="float:left;">
                    <p>
                        <%= babyInfo.BabyName %>(1234565)</p>
                    <p>
                        <%= babyInfo.LiveProvince%>
                        <%= babyInfo.LiveCity %></p>
                    <p>
                        <%= WebSite.Core.AgeCalcHelper.AgeCalc(babyInfo.BabyBirthday) %></p>
                    <p>
                        家长：<%= babyInfo.ParentFirstName %>
                        <%= babyInfo.ParentLastName %></p>
                    <p>
                        <a href="/ViewBaby.aspx?BabyID=<%= babyInfo.Id %>" target="_blank" style="color: Red">查看宝宝资料</a></p>
                </div>
                <div class="clearfloat"></div>
            </div>
            <div>
                <a href="javascript:inviteTeam(<%= babyInfo.Id %>);">
                    <img src="images/LookingForTeam/invite.png" />
                </a>
            </div>
        </div>
        <% } %>
        <div class="clearfloat"></div>
    </div>
    <div class="pager">
        <% System.Collections.Generic.Dictionary<string, string> pp = new System.Collections.Generic.Dictionary<string, string>();
           pp.Add( "Query", Request["Query"] );
        %>
        <%=Shanda.Utility.Common.PaginationHelper.DoPagination(PageIndex, PageSize, RowTotal, "/LookingForTeam.aspx", pp, false)%>
        <div class="clearfloat">
        </div>
    </div>
    <div style="margin-top: 20px;">
        <img src="images/LookingForTeam/womuyouduiyou.png" alt="has" /> 
        <div style="font-size:14px; color:Red">请注意：每天只有5次邀请机会。最先接受邀请的宝宝将与你组成宝宝帮。如果注册后3天内还未组成宝宝帮，系统将随机为你组队 
        </div>
    </div>
    <div style="text-align: center;">
        <div class="filterarea">
            <ul>
                <li class="<%= Request["rtype"] == "1" ? "cur" : "" %>"><a class="ft_14 brown" href="/LookingForTeam.aspx?rtype=1">
                    年龄相近的宝宝</a></li>
                <li class="<%= Request["rtype"] == "2" ? "cur" : "" %>"><a class="ft_14 brown" href="/LookingForTeam.aspx?rtype=2">
                    地域相近的宝宝</a></li>
                <li class="<%= Request["rtype"] != "1" && Request["rtype"] != "2" ? "cur" : "" %>"><a
                    class="ft_14 brown" href="/LookingForTeam.aspx?rtype=3"  target="_blank">最新注册的宝宝</a></li>
            </ul>
        </div>
    </div>
    <div id="findresult2" style="margin-top: 20px">
        <% foreach (var babyInfo in listSearchByType)
           {%>
        <div class="resultitem">
            <div style="height: 210px">
                <div class="photoframe">
                    <img class="wbshare" src="<%=babyInfo.BabyHeadImg %>" alt="photo" />
                </div>
            </div>
            <div class="textpart ft_12" style="">
                <%= babyInfo.BabyName %>&nbsp;&nbsp;<%= WebSite.Core.AgeCalcHelper.AgeCalc(babyInfo.BabyBirthday) %>&nbsp;&nbsp;<%=babyInfo.LiveProvince %><%=babyInfo.LiveArea %>
            </div>
            <div>
                <a href="/ViewBaby.aspx?BabyID=<%= babyInfo.Id %>" target="_blank">
                    <img src="images/LookingForTeam/view.png" />
                </a>
                &nbsp; <a href="javascript:inviteTeam(<%= babyInfo.Id %>);">
                    <img src="images/LookingForTeam/invite2.png" />
                </a>
            </div>
        </div>
        <% } %>
        <div class="clearfloat"></div>
    </div>
    <div class="pager" style="text-align: center; margin-bottom: 20px;">
        <% System.Collections.Generic.Dictionary<string, string> pp2 = new System.Collections.Generic.Dictionary<string, string>();
           pp2.Add( "rtype", Request["rtype"] );
        %>
        <%=Shanda.Utility.Common.PaginationHelper.DoPagination2(rPageIndex, rPageSize, rRowTotal, "/LookingForTeam.aspx", pp2, false)%>
        <div class="clearfloat">
        </div>
    </div>
    <script type="text/javascript">
        function goQuery()
        {
            window.location = "/LookingForTeam.aspx?query=" + encodeURI($("#searchByName").val());
        }
    </script>
</asp:Content>
